/*
 * @Description: 
 */
import {
	mapState,
	mapGetters
} from 'vuex';

export default {
	computed: {
		...mapState(['app_user_info']),
	},
	data() {
		return {
			app_bidding_status: [],
			sale_warehouse_type: [],
			query: {
				pageNo: 1,
				pageSize: 20,
			},
			listsData: [],
			isLoadMore: false,
			transferColumns: [
				[{
					value: 'wait',
					label: '待审核'
				}, {
					value: 'pass',
					label: '已调拨'
				}, {
					value: 'reject',
					label: '驳回'
				}, {
					value: 'timeoutCancel',
					label: '超时取消'
				}, {
					value: 'cancel',
					label: '取消'
				}]
			],
			conditionTypeCodeColumns: [
				[]
			]
		};
	},
	onPageScroll(e) {

	},
	onLoad() {
		if (uni.getStorageSync('token')) {

		}
	},
	methods: {
		searchList() {
			this.isLoadMore = false;
			this.listsData = [];
			this.query.pageNo = 1;
			this.getLists();
		},
		setFormData(data) {
			for (const key in this.formData) {
				if (data[key] != null && data[key] != undefined) {
					this.formData[key] = data[key];
				}
			}
		},
		// 竞价状态
		biddingStatus() {
			this.$store.dispatch('SystemDict', 'app_sale_bidding_status').then(res => {
				this.app_bidding_status = res.data;

			})
		},
		// 仓库权限
		saleWarehouseType() {
			// mobileConfig  0仓库、1 销售、2 调拨 
			this.$store.dispatch('SystemDict', 'sale_warehouse_type').then(res => {
				this.sale_warehouse_type = res.data;
			})
		},
		// 机况类型
		conditionTypeCode() {
			this.conditionTypeCodeColumns[0] = [];
			this.$store.dispatch('SystemDict', 'condition_type').then(res => {
				this.conditionTypeCodeColumns[0] = res.data;
			})
		}

	}
};